package sac.modelo.data.maestros;

/**
 * "Visual Paradigm: DO NOT MODIFY THIS FILE!"
 * 
 * This is an automatic generated file. It will be regenerated every time 
 * you generate persistence class.
 * 
 * Modifying its content may cause the program not work, or your work may lost.
 */

/**
 * Licensee: 
 * License Type: Evaluation
 */
import java.io.Serializable;
import javax.persistence.*;

import sac.modelo.data.transacciones.CompraCabrito;
@Entity
@org.hibernate.annotations.Proxy(lazy=false)
@Table(name="Vendedor")
public class Vendedor implements Serializable {
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	public Vendedor() {
	}
	
	@Column(name="cedula_vendedor", nullable=false)	
	@Id		
	private String cedula_vendedor;
	
	@Column(name="nombre", nullable=false, length=30)	
	private String nombre;
	
	@Column(name="apellido", nullable=false, length=30)	
	private String apellido;
	
	@Column(name="telefono", nullable=true, length=20)	
	private String telefono;
	
	@OneToMany(mappedBy="vendedorcedula_vendedor", targetEntity=CompraCabrito.class)	
	@org.hibernate.annotations.Cascade({org.hibernate.annotations.CascadeType.SAVE_UPDATE, org.hibernate.annotations.CascadeType.LOCK})	
	@org.hibernate.annotations.LazyCollection(org.hibernate.annotations.LazyCollectionOption.TRUE)	
	private java.util.Set<CompraCabrito> compraCabrito = new java.util.HashSet<CompraCabrito>();
	
	public void setCedula_vendedor(String value) {
		this.cedula_vendedor = value;
	}
	
	public String getCedula_vendedor() {
		return cedula_vendedor;
	}
	
	public String getORMID() {
		return getCedula_vendedor();
	}
	
	public void setNombre(String value) {
		this.nombre = value;
	}
	
	public String getNombre() {
		return nombre;
	}
	
	public void setApellido(String value) {
		this.apellido = value;
	}
	
	public String getApellido() {
		return apellido;
	}
	
	public void setTelefono(String value) {
		this.telefono = value;
	}
	
	public String getTelefono() {
		return telefono;
	}
	
	public void setCompra_Cabrito(java.util.Set<CompraCabrito> value) {
		this.compraCabrito = value;
	}
	
	public java.util.Set<CompraCabrito> getCompra_Cabrito() {
		return compraCabrito;
	}
	
	
	public String toString() {
		return String.valueOf(getCedula_vendedor());
	}
	
	@Transient	
	private boolean _saved = false;
	
	public void onSave() {
		_saved=true;
	}
	
	public void onLoad() {
		_saved=true;
	}
	
	public boolean isSaved() {
		return _saved;
	}	
}
